import 'package:get/get.dart';

import '../modules/drawing_board/page/drawing_board_page.dart';
import '../modules/main/widget/little_painter_main.dart';
import '../modules/other/notfound_page.dart';
import '../modules/test/painter/mobile_example.dart';
import '../utils/router_name.dart';

/// 初始化路由
class InitRouters {
  /// 最初的路线
  static String initialRoute = RouterName.home;

  /// 找不到页面 404
  static GetPage? unknownRoute = GetPage(
    name: RouterName.notfound,
    page: () => const NotfoundPage(),
  );

  /// 路线列表
  static List<GetPage> getPages() {
    return [
      GetPage(
        name: RouterName.home,
        page: () => const LittlePainterMain(),
      ),
      GetPage(
        name: RouterName.drawingBoardPage,
        page: () => const DrawingBoardPage(),
      ),
      GetPage(
        name: RouterName.testPainter,
        page: () => const MobileExample(),
      ),
    ];
  }
}
